<div class="users_box">
    <el-row>
        <el-breadcrumb separator-class="el-icon-arrow-right">
            <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
            <el-breadcrumb-item>用户管理</el-breadcrumb-item>
            <el-breadcrumb-item>用户列表</el-breadcrumb-item>
        </el-breadcrumb>
    </el-row>

    <el-row class="search_box">
        <el-col :span="8">
        <el-input v-model="info.query" @input="() => this.info.pagenum = 1" placeholder="请输入内容" class="input-with-select">
            <el-button @click="() => this.info.pagenum = 1" slot="append" icon="el-icon-search"></el-button>
          </el-input>
        </el-col>
        <el-col :span="2" :offset="2">
            <el-button type="success">添加用户</el-button>
        </el-col>
    </el-row>

    <el-row class="list">
        <el-table
        :data="users"
        border
        style="min-width: 1070px">
        <el-table-column
          type="index"
          label="序号"
          width="70">
        </el-table-column>
        <el-table-column
          prop="username"
          label="用户名"
          width="100">
        </el-table-column>
        <el-table-column
          prop="role_name"
          label="身份名称"
          width="130">
        </el-table-column>
        <el-table-column
          prop="email"
          label="邮箱"
          width="200">
        </el-table-column>
        <el-table-column
          prop="mobile"
          label="密码"
          width="170">
        </el-table-column>
        <el-table-column
        label="账号状态"
        width="100">
        <template slot-scope="data">
            <el-switch 
            active-color="#13ce66"
            inactive-color="#ff4949"
            v-model="data.row.mg_state"></el-switch>
        </template>
      </el-table-column>
      <el-table-column
        label="操作"
        width="300">
        <template slot-scope="data">
            <el-tooltip class="item" effect="dark" content="编辑" placement="left">
                <el-button icon="el-icon-edit" size="mini" type="success" circle></el-button>
            </el-tooltip>
            <el-tooltip class="item" effect="dark" content="删除" placement="top">
                <el-button icon="el-icon-delete" size="mini" type="danger" circle></el-button>
            </el-tooltip>
            <el-tooltip class="item" effect="dark" content="分配权限" placement="right">
                <el-button icon="el-icon-setting" size="mini" type="primary" circle></el-button>
            </el-tooltip>
        </template>
      </el-table-column>
      </el-table>
    </el-row>

    <el-row class="pagenation">
    <el-pagination
      @size-change="val => this.info.pagesize = val"
      @current-change="val => this.info.pagenum = val"
      :current-page="info.pagenum"
      :page-sizes="[2, 4, 6, 8]"
      :page-size="info.pagesize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
    </el-row>
</div>